#include <iostream>

template <typename T>
void swap(T& a,T& b){
    T tmp;
    tmp=b;
    b=a;
    a=tmp;
}

int main(){
    int a=1;
    int b=10;
    std::cout<<"自己的函数："<<std::endl;
    std::cout<<"交换前："<<a<<","<<b<<std::endl;
    swap(a,b);
    std::cout<<"交换后："<<a<<","<<b<<std::endl;

    std::cout<<"std中函数："<<std::endl;
    std::cout<<"交换前："<<a<<","<<b<<std::endl;
    std::swap(a,b);
    std::cout<<"交换后："<<a<<","<<b<<std::endl;
}